package com.chinasofti.serializable;

import java.io.*;

public class Test02 {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        ObjectInputStream ois =
                new ObjectInputStream(new FileInputStream("java419\\oos.txt"));
        //读取对象
        Object obj = ois.readObject();
        Student s = (Student)obj;
        System.out.println(s.getName());
        System.out.println(s.getAge());

        ois.close();
    }
}
